'use strict';
var t,
  e = (t = require('fs')) && 'object' == typeof t && 'default' in t ? t.default : t,
  n =
    'undefined' != typeof globalThis
      ? globalThis
      : 'undefined' != typeof window
      ? window
      : 'undefined' != typeof global
      ? global
      : 'undefined' != typeof self
      ? self
      : {};
function r(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, 'default') ? t.default : t;
}
function o(t, e) {
  return t((e = { exports: {} }), e.exports), e.exports;
}
var i = o(function (t, e) {
  Object.defineProperty(e, '__esModule', { value: !0 }), (e.font16x32 = e.font12x24 = e.font8x16 = void 0);
  var n = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
  (e.font8x16 = {
    w: 8,
    h: 16,
    fonts: n,
    data: [
      [0, 0, 0, 0, 0, 0, 0, 60, 66, 30, 34, 66, 66, 63, 0, 0],
      [0, 0, 0, 192, 64, 64, 64, 88, 100, 66, 66, 66, 100, 88, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 28, 34, 64, 64, 64, 34, 28, 0, 0],
      [0, 0, 0, 6, 2, 2, 2, 30, 34, 66, 66, 66, 38, 27, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 60, 66, 126, 64, 64, 66, 60, 0, 0],
      [0, 0, 0, 15, 17, 16, 16, 126, 16, 16, 16, 16, 16, 124, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 62, 68, 68, 56, 64, 60, 66, 66, 60],
      [0, 0, 0, 192, 64, 64, 64, 92, 98, 66, 66, 66, 66, 231, 0, 0],
      [0, 0, 0, 48, 48, 0, 0, 112, 16, 16, 16, 16, 16, 124, 0, 0],
      [0, 0, 0, 12, 12, 0, 0, 28, 4, 4, 4, 4, 4, 4, 68, 120],
      [0, 0, 0, 192, 64, 64, 64, 78, 72, 80, 104, 72, 68, 238, 0, 0],
      [0, 0, 0, 112, 16, 16, 16, 16, 16, 16, 16, 16, 16, 124, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 254, 73, 73, 73, 73, 73, 237, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 220, 98, 66, 66, 66, 66, 231, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 60, 66, 66, 66, 66, 66, 60, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 216, 100, 66, 66, 66, 68, 120, 64, 224],
      [0, 0, 0, 0, 0, 0, 0, 30, 34, 66, 66, 66, 34, 30, 2, 7],
      [0, 0, 0, 0, 0, 0, 0, 238, 50, 32, 32, 32, 32, 248, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 62, 66, 64, 60, 2, 66, 124, 0, 0],
      [0, 0, 0, 0, 0, 16, 16, 124, 16, 16, 16, 16, 16, 12, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 198, 66, 66, 66, 66, 70, 59, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 231, 66, 36, 36, 40, 16, 16, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 215, 146, 146, 170, 170, 68, 68, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 110, 36, 24, 24, 24, 36, 118, 0, 0],
      [0, 0, 0, 0, 0, 0, 0, 231, 66, 36, 36, 40, 24, 16, 16, 224],
      [0, 0, 0, 0, 0, 0, 0, 126, 68, 8, 16, 16, 34, 126, 0, 0],
      [0, 0, 0, 16, 16, 24, 40, 40, 36, 60, 68, 66, 66, 231, 0, 0],
      [0, 0, 0, 248, 68, 68, 68, 120, 68, 66, 66, 66, 68, 248, 0, 0],
      [0, 0, 0, 62, 66, 66, 128, 128, 128, 128, 128, 66, 68, 56, 0, 0],
      [0, 0, 0, 248, 68, 66, 66, 66, 66, 66, 66, 66, 68, 248, 0, 0],
      [0, 0, 0, 252, 66, 72, 72, 120, 72, 72, 64, 66, 66, 252, 0, 0],
      [0, 0, 0, 252, 66, 72, 72, 120, 72, 72, 64, 64, 64, 224, 0, 0],
      [0, 0, 0, 60, 68, 68, 128, 128, 128, 142, 132, 68, 68, 56, 0, 0],
      [0, 0, 0, 231, 66, 66, 66, 66, 126, 66, 66, 66, 66, 231, 0, 0],
      [0, 0, 0, 124, 16, 16, 16, 16, 16, 16, 16, 16, 16, 124, 0, 0],
      [0, 0, 0, 62, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 136, 240],
      [0, 0, 0, 238, 68, 72, 80, 112, 80, 72, 72, 68, 68, 238, 0, 0],
      [0, 0, 0, 224, 64, 64, 64, 64, 64, 64, 64, 64, 66, 254, 0, 0],
      [0, 0, 0, 238, 108, 108, 108, 108, 84, 84, 84, 84, 84, 214, 0, 0],
      [0, 0, 0, 199, 98, 98, 82, 82, 74, 74, 74, 70, 70, 226, 0, 0],
      [0, 0, 0, 56, 68, 130, 130, 130, 130, 130, 130, 130, 68, 56, 0, 0],
      [0, 0, 0, 252, 66, 66, 66, 66, 124, 64, 64, 64, 64, 224, 0, 0],
      [0, 0, 0, 56, 68, 130, 130, 130, 130, 130, 178, 202, 76, 56, 6, 0],
      [0, 0, 0, 252, 66, 66, 66, 124, 72, 72, 68, 68, 66, 227, 0, 0],
      [0, 0, 0, 62, 66, 66, 64, 32, 24, 4, 2, 66, 66, 124, 0, 0],
      [0, 0, 0, 254, 146, 16, 16, 16, 16, 16, 16, 16, 16, 56, 0, 0],
      [0, 0, 0, 231, 66, 66, 66, 66, 66, 66, 66, 66, 66, 60, 0, 0],
      [0, 0, 0, 231, 66, 66, 68, 36, 36, 40, 40, 24, 16, 16, 0, 0],
      [0, 0, 0, 214, 146, 146, 146, 146, 170, 170, 108, 68, 68, 68, 0, 0],
      [0, 0, 0, 231, 66, 36, 36, 24, 24, 24, 36, 36, 66, 231, 0, 0],
      [0, 0, 0, 238, 68, 68, 40, 40, 16, 16, 16, 16, 16, 56, 0, 0],
      [0, 0, 0, 126, 132, 4, 8, 8, 16, 32, 32, 66, 66, 252, 0, 0],
      [0, 0, 0, 24, 36, 66, 66, 66, 66, 66, 66, 66, 36, 24, 0, 0],
      [0, 0, 0, 16, 112, 16, 16, 16, 16, 16, 16, 16, 16, 124, 0, 0],
      [0, 0, 0, 60, 66, 66, 66, 4, 4, 8, 16, 32, 66, 126, 0, 0],
      [0, 0, 0, 60, 66, 66, 4, 24, 4, 2, 2, 66, 68, 56, 0, 0],
      [0, 0, 0, 4, 12, 20, 36, 36, 68, 68, 126, 4, 4, 30, 0, 0],
      [0, 0, 0, 126, 64, 64, 64, 88, 100, 2, 2, 66, 68, 56, 0, 0],
      [0, 0, 0, 28, 36, 64, 64, 88, 100, 66, 66, 66, 36, 24, 0, 0],
      [0, 0, 0, 126, 68, 68, 8, 8, 16, 16, 16, 16, 16, 16, 0, 0],
      [0, 0, 0, 60, 66, 66, 66, 36, 24, 36, 66, 66, 66, 60, 0, 0],
      [0, 0, 0, 24, 36, 66, 66, 66, 38, 26, 2, 2, 36, 56, 0, 0]
    ]
  }),
    (e.font12x24 = {
      w: 12,
      h: 24,
      fonts: n,
      data: [
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 48, 48, 7, 28, 48, 96, 96, 96, 113, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 192, 192, 192, 192, 192,
          192, 192, 208, 240, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 16, 112, 48, 48, 48, 48, 51, 60, 56, 48, 48, 48, 48, 48, 48, 56, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 96, 96, 96, 96, 96,
          96, 64, 192, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 49, 49, 97, 96, 96, 96, 96, 48, 48, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 0, 0, 0, 64, 64,
          128, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 30, 49, 48, 96, 96, 96, 96, 96, 32, 49, 30, 0, 0, 0, 0, 0, 0, 0, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
          192, 192, 192, 192, 224, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 24, 16, 48, 63, 48, 48, 48, 24, 28, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 96, 96, 224, 0, 0, 0, 32, 64,
          128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 3, 6, 12, 12, 12, 127, 12, 12, 12, 12, 12, 12, 12, 12, 12, 63, 0, 0, 0, 0, 0, 0, 0, 0, 192, 96, 96, 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 25, 48, 48, 48, 25, 31, 48, 62, 31, 96, 96, 112, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 144, 192, 192, 192, 128, 0,
          0, 0, 192, 96, 96, 224, 128
        ],
        [
          0, 0, 0, 0, 16, 112, 48, 48, 48, 48, 55, 56, 48, 48, 48, 48, 48, 48, 48, 48, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 192, 192, 192, 192,
          192, 192, 192, 192, 224, 0, 0, 0
        ],
        [0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 62, 6, 6, 6, 6, 6, 6, 6, 6, 6, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0],
        [
          0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 15, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 62, 0, 0, 0, 0, 0, 128, 128, 0, 0, 0, 128, 128, 128, 128, 128, 128, 128, 128,
          128, 128, 128, 128, 0, 0
        ],
        [
          0, 0, 0, 0, 16, 112, 48, 48, 48, 48, 51, 49, 51, 50, 54, 62, 59, 51, 49, 49, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 0,
          128, 128, 224, 0, 0, 0
        ],
        [0, 0, 0, 0, 2, 62, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 238, 119, 102, 102, 102, 102, 102, 102, 102, 102, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 96, 96, 96, 96, 96,
          96, 96, 96, 96, 112, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 60, 48, 48, 48, 48, 48, 48, 48, 48, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 192, 192, 192, 192, 192,
          192, 192, 192, 224, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 25, 48, 96, 96, 96, 96, 96, 48, 48, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 96, 96, 96, 96, 96, 192,
          192, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 56, 48, 48, 48, 48, 48, 48, 48, 56, 55, 48, 48, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 96, 96, 96, 96, 96,
          96, 192, 192, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 49, 48, 96, 96, 96, 96, 96, 32, 49, 30, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 192, 192, 192, 192, 192, 192,
          192, 192, 192, 192, 192, 192, 224
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 26, 28, 24, 24, 24, 24, 24, 24, 24, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 24, 48, 48, 28, 15, 1, 32, 32, 48, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 96, 32, 0, 0, 128, 192, 96, 96,
          192, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 4, 4, 12, 12, 127, 12, 12, 12, 12, 12, 12, 12, 12, 12, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 64, 64,
          128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 113, 48, 48, 48, 48, 48, 48, 48, 48, 57, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 192, 192, 192, 192, 192, 192, 192,
          192, 192, 224, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 56, 24, 24, 12, 12, 12, 7, 7, 7, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 96, 64, 64, 128, 128, 128, 0, 0, 0,
          0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 99, 99, 103, 55, 53, 57, 57, 57, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 32, 32, 32, 32, 192, 192, 192,
          192, 128, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 24, 25, 13, 14, 6, 7, 11, 25, 17, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 128, 128, 0, 0, 0, 0, 0, 128,
          192, 224, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 56, 24, 24, 13, 13, 13, 6, 6, 2, 4, 4, 40, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 128, 128, 128, 0, 0, 0, 0, 0, 0,
          0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 33, 35, 3, 7, 6, 14, 12, 28, 24, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 128, 128, 0, 0, 0, 0, 32, 32, 96,
          192, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 6, 6, 14, 11, 11, 19, 17, 17, 17, 31, 32, 32, 32, 32, 96, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, 192, 192,
          192, 96, 96, 240, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 255, 97, 96, 96, 96, 96, 97, 127, 96, 96, 96, 96, 96, 96, 96, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 192, 192, 192, 128, 0, 192, 64,
          96, 96, 96, 96, 192, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 7, 24, 48, 48, 32, 96, 96, 96, 96, 96, 96, 96, 48, 48, 24, 15, 0, 0, 0, 0, 0, 0, 0, 0, 224, 96, 32, 32, 0, 0, 0, 0, 0, 0, 0, 32, 32,
          64, 128, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 254, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 99, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 192, 96, 96, 96, 96, 96, 96, 96,
          96, 192, 192, 128, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 255, 96, 96, 96, 96, 97, 97, 127, 97, 97, 96, 96, 96, 96, 96, 255, 0, 0, 0, 0, 0, 0, 0, 0, 192, 64, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
          32, 64, 192, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 255, 96, 96, 96, 96, 97, 97, 127, 97, 97, 96, 96, 96, 96, 96, 240, 0, 0, 0, 0, 0, 0, 0, 0, 192, 192, 32, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 15, 24, 48, 48, 32, 96, 96, 96, 96, 99, 96, 96, 48, 48, 24, 15, 0, 0, 0, 0, 0, 0, 0, 0, 64, 192, 64, 64, 0, 0, 0, 0, 0, 240, 192, 192,
          192, 192, 192, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 240, 96, 96, 96, 96, 96, 96, 127, 96, 96, 96, 96, 96, 96, 96, 240, 0, 0, 0, 0, 0, 0, 0, 0, 240, 96, 96, 96, 96, 96, 96, 224, 96, 96,
          96, 96, 96, 96, 96, 240, 0, 0, 0
        ],
        [0, 0, 0, 0, 0, 63, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 63, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0],
        [
          0, 0, 0, 0, 0, 15, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 97, 99, 62, 0, 0, 0, 0, 0, 240, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
          128, 128, 128, 128, 128, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 243, 96, 97, 98, 98, 100, 108, 124, 118, 103, 99, 99, 97, 96, 96, 241, 0, 0, 0, 0, 0, 0, 0, 0, 224, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          128, 128, 192, 224, 240, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 240, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32,
          64, 192, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 240, 112, 112, 112, 89, 89, 89, 89, 90, 78, 78, 78, 78, 68, 68, 228, 0, 0, 0, 0, 0, 0, 0, 0, 240, 224, 224, 224, 96, 96, 96, 96, 96,
          96, 96, 96, 96, 96, 96, 240, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 224, 112, 112, 88, 88, 76, 70, 70, 67, 67, 65, 64, 64, 64, 64, 224, 0, 0, 0, 0, 0, 0, 0, 0, 112, 32, 32, 32, 32, 32, 32, 32, 32, 32,
          160, 224, 224, 96, 96, 32, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 15, 25, 48, 48, 96, 96, 96, 96, 96, 96, 96, 96, 48, 48, 25, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 64, 96, 96, 96, 96, 96, 96, 96,
          96, 64, 192, 128, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 255, 96, 96, 96, 96, 96, 96, 96, 127, 96, 96, 96, 96, 96, 96, 240, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 96, 96, 96, 96, 96, 192, 128, 0,
          0, 0, 0, 0, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 15, 25, 48, 48, 96, 96, 96, 96, 96, 96, 96, 110, 50, 49, 17, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 64, 96, 96, 96, 96, 96, 96, 96,
          96, 64, 192, 128, 128, 224, 192, 0
        ],
        [
          0, 0, 0, 0, 0, 255, 96, 96, 96, 96, 96, 96, 127, 102, 99, 99, 97, 97, 96, 96, 240, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 96, 96, 96, 96, 192, 0, 0, 0, 0,
          128, 128, 192, 192, 112, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 31, 48, 96, 96, 96, 112, 60, 15, 3, 0, 0, 64, 64, 96, 112, 79, 0, 0, 0, 0, 0, 0, 0, 0, 32, 224, 32, 32, 0, 0, 0, 0, 192, 192, 96, 96,
          96, 96, 192, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 127, 70, 134, 134, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 15, 0, 0, 0, 0, 0, 0, 0, 0, 224, 32, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0
        ],
        [
          0, 0, 0, 0, 0, 240, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 48, 31, 0, 0, 0, 0, 0, 0, 0, 0, 112, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
          32, 32, 32, 64, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 248, 112, 48, 48, 48, 48, 24, 24, 24, 24, 13, 13, 13, 15, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 240, 96, 64, 64, 64, 128, 128, 128, 128, 128,
          0, 0, 0, 0, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 247, 102, 102, 102, 102, 103, 55, 55, 59, 59, 59, 59, 57, 17, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 112, 32, 32, 64, 64, 64, 64, 64, 128,
          128, 128, 128, 128, 0, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 121, 48, 24, 24, 25, 13, 14, 6, 6, 7, 11, 11, 25, 17, 48, 121, 0, 0, 0, 0, 0, 0, 0, 0, 224, 192, 128, 128, 0, 0, 0, 0, 0, 0, 0, 128,
          128, 128, 192, 224, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 248, 112, 48, 48, 24, 24, 13, 13, 14, 6, 6, 6, 6, 6, 6, 31, 0, 0, 0, 0, 0, 0, 0, 0, 240, 96, 64, 128, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 63, 32, 65, 1, 3, 3, 3, 6, 6, 12, 12, 24, 24, 56, 48, 127, 0, 0, 0, 0, 0, 0, 0, 0, 224, 192, 192, 128, 128, 0, 0, 0, 0, 0, 0, 0, 32,
          32, 64, 192, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 15, 25, 48, 48, 96, 96, 96, 96, 96, 96, 96, 96, 48, 48, 25, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 192, 96, 96, 96, 96, 96, 96, 96,
          96, 192, 192, 128, 0, 0, 0, 0
        ],
        [0, 0, 0, 0, 0, 2, 6, 62, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0],
        [
          0, 0, 0, 0, 0, 31, 33, 64, 96, 96, 0, 1, 1, 3, 4, 8, 16, 32, 64, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 192, 192, 192, 128, 128, 0, 0, 0, 64,
          64, 64, 192, 192, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 30, 35, 97, 97, 97, 1, 3, 14, 1, 0, 0, 96, 96, 96, 33, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, 0, 0, 128, 128, 192, 192,
          192, 192, 128, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 1, 3, 3, 5, 9, 9, 17, 33, 33, 65, 127, 1, 1, 1, 1, 7, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 224,
          128, 128, 128, 128, 224, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 63, 63, 32, 32, 32, 32, 47, 49, 32, 0, 0, 96, 96, 65, 33, 31, 0, 0, 0, 0, 0, 0, 0, 0, 192, 192, 0, 0, 0, 0, 0, 128, 192, 192, 192, 192,
          192, 128, 128, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 7, 24, 48, 48, 32, 96, 103, 104, 112, 96, 96, 96, 32, 48, 24, 15, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 192, 0, 0, 0, 128, 192, 96, 96, 96,
          96, 96, 64, 192, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 31, 63, 48, 32, 32, 0, 1, 1, 2, 2, 2, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 64, 128, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 31, 48, 96, 96, 96, 112, 60, 15, 51, 32, 96, 96, 96, 96, 48, 15, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 96, 96, 96, 64, 192, 0, 128, 192,
          96, 96, 96, 96, 192, 128, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 15, 48, 48, 96, 96, 96, 96, 96, 49, 30, 0, 0, 0, 48, 49, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 64, 96, 96, 96, 224, 96, 96, 96, 192,
          192, 128, 128, 0, 0, 0, 0
        ]
      ]
    }),
    (e.font16x32 = {
      w: 16,
      h: 32,
      fonts: n,
      data: [
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 24, 48, 48, 0, 1, 14, 56, 48, 96, 96, 96, 48, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          192, 96, 48, 48, 48, 240, 48, 48, 48, 48, 48, 50, 242, 28, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 8, 120, 24, 24, 24, 24, 24, 24, 24, 27, 28, 28, 24, 24, 24, 24, 24, 24, 24, 28, 30, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 240, 24, 12, 6, 6, 6, 6, 6, 6, 6, 4, 12, 24, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 14, 24, 24, 48, 48, 48, 48, 48, 48, 24, 24, 12, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          224, 48, 24, 24, 24, 0, 0, 0, 0, 4, 4, 8, 16, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 12, 24, 24, 48, 48, 48, 48, 48, 48, 16, 24, 12, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 120, 24, 24, 24, 24, 24,
          24, 216, 56, 24, 24, 24, 24, 24, 24, 24, 24, 24, 56, 94, 144, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 12, 24, 16, 48, 48, 63, 48, 48, 48, 24, 24, 14, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          224, 48, 24, 8, 12, 12, 252, 0, 0, 0, 4, 8, 24, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 3, 3, 3, 63, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 195, 3, 3, 0, 0, 0, 248, 0,
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 12, 8, 24, 24, 24, 8, 12, 15, 24, 24, 15, 15, 16, 48, 48, 48, 28, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          238, 54, 24, 24, 24, 24, 24, 48, 224, 0, 0, 240, 252, 14, 6, 6, 6, 28, 240
        ],
        [
          0, 0, 0, 0, 0, 8, 120, 24, 24, 24, 24, 24, 24, 25, 27, 28, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0, 240, 24, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 63, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 31, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 192, 192, 0, 0, 0, 128, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 248, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 15, 0, 0, 0, 0, 0, 0, 28, 28, 28, 0, 0, 0, 8, 248, 24,
          24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 48, 96, 192
        ],
        [
          0, 0, 0, 0, 0, 8, 120, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 27, 28, 24, 24, 24, 24, 24, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0, 124, 48, 96, 192, 128, 128, 128, 192, 224, 96, 48, 56, 24, 62, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 31, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, 128, 128, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 248, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 119, 57, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 56, 204, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 222, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 120, 27, 28, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          240, 24, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 63, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 14, 8, 24, 48, 48, 48, 48, 48, 48, 24, 24, 12, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224,
          56, 12, 12, 6, 6, 6, 6, 6, 6, 12, 12, 24, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 121, 26, 28, 24, 24, 24, 24, 24, 24, 24, 24, 28, 30, 25, 24, 24, 24, 24, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 240, 24, 12, 4, 6, 6, 6, 6, 6, 6, 12, 12, 24, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 12, 24, 24, 48, 48, 48, 48, 48, 48, 16, 24, 12, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          196, 60, 28, 12, 12, 12, 12, 12, 12, 12, 12, 28, 60, 204, 12, 12, 12, 12, 63
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 126, 6, 6, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 102,
          134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 12, 24, 24, 24, 14, 7, 1, 0, 32, 32, 48, 56, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228,
          28, 12, 4, 0, 0, 192, 240, 56, 12, 12, 12, 24, 240, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 7, 63, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 0, 0, 0,
          0, 0, 0, 0, 0, 0, 4, 4, 136, 240, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 120, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 12, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
          60, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 28, 47, 200, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 24, 24, 28, 12, 12, 14, 6, 6, 7, 3, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 24,
          16, 16, 32, 32, 64, 64, 64, 128, 128, 128, 0, 0, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251, 113, 48, 49, 49, 25, 25, 26, 26, 14, 14, 14, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          239, 198, 196, 196, 196, 200, 200, 104, 104, 112, 112, 112, 32, 32, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 14, 14, 7, 3, 3, 1, 1, 2, 6, 4, 8, 24, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 16,
          32, 32, 64, 128, 192, 192, 224, 96, 48, 48, 24, 126, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 24, 24, 12, 12, 12, 6, 6, 3, 3, 3, 1, 1, 1, 1, 1, 1, 50, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,
          24, 16, 16, 16, 32, 32, 32, 64, 64, 64, 128, 128, 128, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 48, 32, 32, 0, 1, 1, 3, 7, 14, 12, 28, 56, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248,
          48, 112, 96, 192, 192, 128, 0, 0, 4, 4, 12, 24, 248, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 3, 3, 3, 2, 6, 4, 4, 4, 12, 8, 8, 8, 31, 16, 16, 16, 48, 32, 32, 96, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, 128,
          192, 192, 192, 192, 96, 96, 96, 96, 240, 48, 48, 48, 48, 24, 24, 24, 62, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 127, 24, 24, 24, 24, 24, 24, 24, 24, 31, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 56, 28,
          12, 12, 12, 12, 24, 48, 224, 24, 12, 4, 6, 6, 6, 6, 6, 12, 24, 240, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 3, 6, 8, 24, 48, 48, 32, 96, 96, 96, 96, 96, 96, 96, 96, 48, 48, 48, 24, 12, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 28, 12, 4, 2,
          2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 4, 12, 24, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 127, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 112, 24,
          12, 12, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 8, 24, 112, 192, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 127, 24, 24, 24, 24, 24, 24, 24, 24, 31, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 12, 4,
          6, 2, 0, 16, 16, 48, 240, 48, 16, 16, 0, 0, 0, 2, 2, 4, 12, 252, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 127, 24, 24, 24, 24, 24, 24, 24, 24, 31, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 14, 2,
          3, 1, 0, 8, 8, 24, 248, 24, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 3, 14, 8, 24, 48, 48, 32, 96, 96, 96, 96, 96, 96, 96, 96, 48, 48, 24, 24, 12, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 56, 8, 8, 4,
          4, 0, 0, 0, 0, 0, 0, 63, 12, 12, 12, 12, 12, 12, 16, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 252, 48, 48, 48, 48, 48, 48, 48, 48, 48, 63, 48, 48, 48, 48, 48, 48, 48, 48, 48, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 24, 24,
          24, 24, 24, 24, 24, 24, 24, 248, 24, 24, 24, 24, 24, 24, 24, 24, 24, 126, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 31, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 128, 128, 128, 128, 128, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 248, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 112, 113, 63, 0, 0, 0, 0, 0, 0, 254, 96, 96, 96, 96, 96, 96,
          96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 192, 128, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 126, 24, 24, 24, 24, 24, 24, 25, 25, 27, 29, 28, 24, 24, 24, 24, 24, 24, 24, 24, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 24, 16,
          32, 96, 64, 128, 128, 128, 128, 192, 192, 224, 96, 112, 48, 56, 24, 12, 12, 63, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 126, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 4, 12, 252, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 248, 56, 56, 56, 56, 44, 44, 44, 44, 46, 38, 38, 38, 38, 35, 35, 35, 35, 35, 33, 249, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 28, 28,
          28, 60, 44, 44, 44, 108, 76, 76, 76, 76, 140, 140, 140, 140, 12, 12, 12, 63, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 248, 56, 60, 44, 44, 46, 38, 39, 35, 35, 33, 33, 32, 32, 32, 32, 32, 32, 32, 32, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 8, 8, 8,
          8, 8, 8, 8, 8, 136, 136, 200, 200, 232, 104, 120, 56, 56, 56, 24, 24, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 3, 12, 24, 16, 48, 48, 96, 96, 96, 96, 96, 96, 96, 96, 96, 48, 48, 16, 24, 12, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 48, 24, 8,
          12, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 12, 8, 24, 48, 192, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 127, 24, 24, 24, 24, 24, 24, 24, 24, 24, 31, 24, 24, 24, 24, 24, 24, 24, 24, 24, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 24, 12,
          6, 6, 6, 6, 6, 12, 24, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 3, 12, 24, 48, 48, 48, 96, 96, 96, 96, 96, 96, 96, 96, 96, 39, 52, 56, 24, 12, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 48, 24, 8,
          12, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 134, 204, 76, 104, 112, 224, 50, 62, 28, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 127, 24, 24, 24, 24, 24, 24, 24, 24, 31, 25, 24, 24, 24, 24, 24, 24, 24, 24, 24, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 56, 28,
          12, 12, 12, 12, 24, 48, 224, 192, 192, 224, 96, 96, 112, 48, 48, 56, 24, 30, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 7, 12, 24, 48, 48, 48, 48, 24, 30, 7, 1, 0, 0, 0, 0, 32, 32, 16, 24, 28, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 28, 12, 4, 4, 0,
          0, 0, 0, 192, 240, 120, 28, 14, 6, 6, 6, 6, 12, 24, 240, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 63, 49, 33, 65, 65, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 132, 134, 130, 130, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 252, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 16, 28, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 8, 8, 8, 8,
          8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 32, 192, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 124, 24, 24, 24, 12, 12, 12, 12, 6, 6, 6, 7, 3, 3, 3, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 4, 4, 4, 8, 8, 8, 8,
          16, 16, 16, 48, 32, 32, 32, 192, 192, 192, 192, 128, 128, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 251, 97, 97, 97, 49, 48, 49, 49, 49, 49, 50, 26, 26, 26, 28, 28, 28, 12, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 207, 134, 132,
          132, 132, 132, 196, 200, 200, 200, 200, 72, 104, 112, 112, 112, 112, 48, 32, 32, 32, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 126, 24, 28, 12, 12, 14, 6, 7, 3, 3, 1, 1, 2, 2, 4, 4, 8, 8, 16, 16, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 16, 16, 32, 32, 64,
          64, 128, 128, 128, 128, 192, 192, 224, 96, 96, 48, 48, 24, 24, 62, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 126, 56, 24, 24, 12, 12, 14, 6, 6, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 8, 8, 16, 16, 48, 32,
          32, 64, 64, 64, 128, 128, 128, 128, 128, 128, 128, 128, 128, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 31, 24, 16, 32, 32, 0, 0, 0, 1, 1, 3, 3, 7, 6, 14, 12, 28, 24, 56, 48, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 24, 24, 48, 112,
          96, 224, 192, 192, 128, 128, 0, 0, 0, 0, 0, 4, 4, 8, 24, 248, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 3, 6, 12, 24, 24, 24, 48, 48, 48, 48, 48, 48, 48, 48, 48, 24, 24, 24, 12, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 48, 24, 12,
          12, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 12, 12, 24, 48, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 1, 31, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 128, 128, 128, 128, 128,
          128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 192, 248, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 7, 8, 16, 32, 32, 48, 48, 0, 0, 0, 0, 0, 0, 1, 2, 4, 8, 16, 32, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 56, 24, 12, 12, 12,
          12, 12, 24, 16, 32, 64, 128, 0, 0, 4, 4, 4, 12, 248, 248, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 7, 24, 48, 48, 48, 48, 0, 0, 0, 3, 0, 0, 0, 0, 0, 48, 48, 48, 48, 24, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 112, 48, 24, 24, 24,
          24, 48, 96, 192, 112, 24, 8, 12, 12, 12, 12, 8, 24, 48, 192, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 6, 4, 8, 8, 16, 32, 32, 127, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 112, 112, 240, 112, 112,
          112, 112, 112, 112, 112, 112, 112, 112, 254, 112, 112, 112, 112, 112, 112, 254, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 16, 16, 19, 20, 24, 16, 0, 0, 0, 0, 48, 48, 32, 32, 16, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 252, 0, 0, 0, 0,
          0, 224, 48, 24, 8, 12, 12, 12, 12, 12, 12, 24, 24, 48, 192, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 1, 3, 4, 8, 24, 24, 16, 48, 49, 54, 60, 56, 48, 48, 48, 48, 24, 24, 12, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 8, 12, 12, 0, 0,
          0, 0, 240, 24, 12, 6, 6, 6, 6, 6, 6, 4, 12, 24, 224, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 31, 31, 56, 48, 32, 32, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 252, 8, 16, 16, 32, 32,
          64, 64, 128, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 7, 12, 24, 48, 48, 48, 56, 28, 14, 7, 13, 24, 48, 96, 96, 96, 96, 96, 48, 24, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 48, 24, 12,
          12, 12, 12, 24, 16, 224, 224, 112, 56, 28, 12, 12, 12, 12, 24, 48, 192, 0, 0, 0, 0, 0
        ],
        [
          0, 0, 0, 0, 0, 0, 7, 24, 48, 48, 96, 96, 96, 96, 96, 96, 48, 24, 15, 0, 0, 0, 0, 48, 48, 48, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 32, 16, 24, 8,
          12, 12, 12, 12, 28, 60, 108, 140, 12, 24, 24, 24, 48, 96, 192, 128, 0, 0, 0, 0, 0
        ]
      ]
    });
});
r(i);
i.font16x32, i.font12x24, i.font8x16;
var a = o(function (t, r) {
  var o =
      (n && n.__awaiter) ||
      function (t, e, n, r) {
        return new (n || (n = Promise))(function (o, i) {
          function a(t) {
            try {
              s(r.next(t));
            } catch (t) {
              i(t);
            }
          }
          function c(t) {
            try {
              s(r.throw(t));
            } catch (t) {
              i(t);
            }
          }
          function s(t) {
            var e;
            t.done
              ? o(t.value)
              : ((e = t.value),
                e instanceof n
                  ? e
                  : new n(function (t) {
                      t(e);
                    })).then(a, c);
          }
          s((r = r.apply(t, e || [])).next());
        });
      },
    a =
      (n && n.__generator) ||
      function (t, e) {
        var n,
          r,
          o,
          i,
          a = {
            label: 0,
            sent: function () {
              if (1 & o[0]) throw o[1];
              return o[1];
            },
            trys: [],
            ops: []
          };
        return (
          (i = { next: c(0), throw: c(1), return: c(2) }),
          'function' == typeof Symbol &&
            (i[Symbol.iterator] = function () {
              return this;
            }),
          i
        );
        function c(i) {
          return function (c) {
            return (function (i) {
              if (n) throw new TypeError('Generator is already executing.');
              for (; a; )
                try {
                  if (((n = 1), r && (o = 2 & i[0] ? r.return : i[0] ? r.throw || ((o = r.return) && o.call(r), 0) : r.next) && !(o = o.call(r, i[1])).done))
                    return o;
                  switch (((r = 0), o && (i = [2 & i[0], o.value]), i[0])) {
                    case 0:
                    case 1:
                      o = i;
                      break;
                    case 4:
                      return a.label++, { value: i[1], done: !1 };
                    case 5:
                      a.label++, (r = i[1]), (i = [0]);
                      continue;
                    case 7:
                      (i = a.ops.pop()), a.trys.pop();
                      continue;
                    default:
                      if (!((o = a.trys), (o = o.length > 0 && o[o.length - 1]) || (6 !== i[0] && 2 !== i[0]))) {
                        a = 0;
                        continue;
                      }
                      if (3 === i[0] && (!o || (i[1] > o[0] && i[1] < o[3]))) {
                        a.label = i[1];
                        break;
                      }
                      if (6 === i[0] && a.label < o[1]) {
                        (a.label = o[1]), (o = i);
                        break;
                      }
                      if (o && a.label < o[2]) {
                        (a.label = o[2]), a.ops.push(i);
                        break;
                      }
                      o[2] && a.ops.pop(), a.trys.pop();
                      continue;
                  }
                  i = e.call(t, a);
                } catch (t) {
                  (i = [6, t]), (r = 0);
                } finally {
                  n = o = 0;
                }
              if (5 & i[0]) throw i[1];
              return { value: i[0] ? i[1] : void 0, done: !0 };
            })([i, c]);
          };
        }
      };
  Object.defineProperty(r, '__esModule', { value: !0 }), (r.BMP24 = void 0);
  var c = (function () {
    function t(t, e) {
      var n = 4 * Math.ceil((3 * t) / 4),
        r = n * e;
      (this.w = t),
        (this.h = e),
        (this.fileLen = r + 54),
        (this._lineByteNum = n),
        (this._data = Buffer.alloc(this.fileLen)),
        (function (t, e, n, r, o) {
          var i = t;
          i.write('BM'),
            i.writeInt32LE(e, 2),
            i.writeInt8(122, 6),
            i.writeInt32LE(54, 10),
            i.writeInt32LE(40, 14),
            i.writeInt32LE(r, 18),
            i.writeInt32LE(o, 22),
            i.writeInt16LE(1, 26),
            i.writeInt16LE(24, 28),
            i.writeInt32LE(n, 34);
        })(this._data, this.fileLen, r, t, e);
    }
    return (
      (t.prototype.getFileData = function () {
        return this._data;
      }),
      (t.prototype.getDataUrl = function () {
        return 'data:image/bmp;base64,' + this._data.toString('base64');
      }),
      (t.prototype.getData = function () {
        return this._data.slice(54);
      }),
      (t.prototype.drawPoint = function (t, e, n) {
        this.drawPointRGB(t, e, { red: (n >> 16) & 255, green: (n >> 8) & 255, blue: 255 & n });
      }),
      (t.prototype.drawPointRGB = function (t, e, n) {
        if (!(t >= this.w || e >= this.h || t < 0 || e < 0)) {
          var r = this.h - e - 1,
            o = 54 + 3 * t + this._lineByteNum * r;
          this._data.writeUInt8(n.blue, o), this._data.writeUInt8(n.green, o + 1), this._data.writeUInt8(n.red, o + 2);
        }
      }),
      (t.prototype.getPointRGB = function (t, e) {
        if (t >= this.w || e >= this.h || t < 0 || e < 0) throw new Error('out of range');
        var n = this.h - e - 1,
          r = 54 + 3 * t + this._lineByteNum * n;
        return { blue: this._data.readUInt8(r), green: this._data.readUInt8(r + 1), red: this._data.readUInt8(r + 2) };
      }),
      (t.prototype.drawLineH = function (t, e, n, r) {
        if (t > e) {
          var o = e;
          (e = t), (t = o);
        }
        for (; t <= e; t++) this.drawPoint(t, n, r);
      }),
      (t.prototype.drawLineV = function (t, e, n, r) {
        if (t > e) {
          var o = e;
          (e = t), (t = o);
        }
        for (; t <= e; t++) this.drawPoint(n, t, r);
      }),
      (t.prototype.drawLine = function (t, e, n, r, o) {
        var i = t,
          a = e,
          c = n > t ? n - t : t - n,
          s = r > e ? r - e : e - r,
          d = !1,
          f = n > t ? 1 : -1,
          u = r > e ? 1 : -1;
        if (s > c) {
          var l = c;
          (c = s), (s = l), (d = !0);
        }
        for (var h = (s << 1) - c, w = 0; w <= c; w++)
          this.drawPoint(i, a, o), h >= 0 && (d ? (i += f) : (a += u), (h -= c << 1)), d ? (a += u) : (i += f), (h += s << 1);
      }),
      (t.prototype.drawRect = function (t, e, n, r, o) {
        var i = t + n - 1,
          a = e + r - 1;
        this.drawLineH(t, i, e, o), this.drawLineH(t, i, a, o), this.drawLineV(e, a, t, o), this.drawLineV(e, a, i, o);
      }),
      (t.prototype.fillRect = function (t, e, n, r, o) {
        var i = t + n - 1,
          a = e + r - 1;
        if (t > i) {
          var c = i;
          (i = t), (t = c);
        }
        if (e > a) {
          c = a;
          (a = e), (e = c);
        }
        for (; e <= a; e++) for (var s = t; s <= i; s++) this.drawPoint(s, e, o);
      }),
      (t.prototype.drawCircle = function (t, e, n, r) {
        for (var o = 0, i = n, a = 3 - 2 * n; o < i; )
          this.drawPoint(t + o, e + i, r),
            this.drawPoint(t - o, e + i, r),
            this.drawPoint(t + o, e - i, r),
            this.drawPoint(t - o, e - i, r),
            this.drawPoint(t + i, e + o, r),
            this.drawPoint(t - i, e + o, r),
            this.drawPoint(t + i, e - o, r),
            this.drawPoint(t - i, e - o, r),
            a < 0 ? (a = a + 4 * o + 6) : ((a = a + 4 * (o - i) + 10), (i -= 1)),
            (o += 1);
        o === i &&
          (this.drawPoint(t + o, e + i, r),
          this.drawPoint(t - o, e + i, r),
          this.drawPoint(t + o, e - i, r),
          this.drawPoint(t - o, e + i, r),
          this.drawPoint(t + i, e + o, r),
          this.drawPoint(t - i, e + o, r),
          this.drawPoint(t + i, e - o, r),
          this.drawPoint(t - i, e - o, r));
      }),
      (t.prototype.drawChar = function (t, e, n, r, o) {
        var i = r.fonts.indexOf(t);
        if (!(i < 0))
          for (var a = n, c = e, s = 0, d = r.data[i]; s < d.length; s++) {
            c = e;
            for (var f = d[s]; f > 0; f <<= 1) 128 & f && this.drawPoint(c, a, o), c++;
            ++a - n >= r.h && ((a = n), (e += 8));
          }
      }),
      (t.prototype.drawString = function (t, e, n, r, o) {
        for (var i = 0, a = t; i < a.length; i++) {
          var c = a[i];
          this.drawChar(c, e, n, r, o), (e += r.w);
        }
      }),
      (t.loadFromFile = function (n) {
        return o(this, void 0, void 0, function () {
          return a(this, function (r) {
            return [
              2,
              new Promise(function (r, o) {
                e.readFile(n, function (e, n) {
                  if (e) return o(e);
                  if (54 !== n.readInt32LE(10)) return o(new Error('unsupported format: headlen !== 54'));
                  if (40 !== n.readInt32LE(14)) return o(new Error('unsupported format: bitmapInfoHead.length !== 40'));
                  if (24 !== n.readInt32LE(28)) return o(new Error('unsupported format: only support 24bit bmp'));
                  var i = new t(0, 0);
                  (i.w = n.readInt32LE(18)),
                    (i.h = n.readInt32LE(22)),
                    (i.fileLen = n.length),
                    (i._lineByteNum = 4 * Math.ceil((3 * i.w) / 4)),
                    (i._data = n),
                    r(i);
                });
              })
            ];
          });
        });
      }),
      (t.font8x16 = i.font8x16),
      (t.font12x24 = i.font12x24),
      (t.font16x32 = i.font16x32),
      t
    );
  })();
  r.BMP24 = c;
});
r(a);
a.BMP24;
const c = a.BMP24,
  s = 'ABCDEFGHKMNPQRSTUVWXYZabcdefghkmnpqrstuvwxyz1234567890';
function d(t, e, n) {
  const r = (function (t) {
    let e = '';
    for (let n = 0; n < t; n++) e += s.charAt((Math.random() * s.length) | 0);
    return e;
  })(e);
  let o = 0;
  for (let i = 0; i < r.length; i++) {
    const a = f(n),
      c = 8 + l(-10, 10);
    t.drawChar(r[i], o, c, a, l(0, 16777215)), (o = (t.w / e) * (i + 1));
  }
  return r;
}
function f(t) {
  const e = { small: c.font8x16, medium: c.font12x24, big: c.font16x32 },
    n = Object.keys(e).reduce((n, r) => (t.includes(r) && n.push(e[r]), n), []);
  return n[(Math.random() * n.length) | 0];
}
function u(t = {}) {
  const e = ['small', 'medium', 'big'],
    n = { backgroundColor: 16775912, size: 4, noise: 4, width: 100, height: 40, fontSize: ['medium', 'big'] };
  let { backgroundColor: r, size: o, noise: i, width: a, height: s, fontSize: f } = Object.assign({}, n, t);
  'string' == typeof r && (r = r.replace('#', '0x')),
    f instanceof Array || (f = []),
    f.filter((t) => e.includes(t)),
    f.length || (f = n.fontSize),
    (o = o > 6 ? 6 : o);
  const u = new c(a, s);
  u.fillRect(0, 0, a, s, r),
    (function (t, e) {
      for (let n = 1; n < e; n++) {
        const e = t.w / n,
          r = t.h,
          o = h().replace('#', '0x'),
          i = l(-5, 10),
          a = l(10, 15),
          c = 10,
          s = 1;
        for (let n = -e; n < e; n += 0.1) {
          const d = Math.floor((r / c) * Math.sin(n / a) + r / 2 + i),
            f = Math.floor(n + e);
          for (let e = 0; e < s; e++) t.drawPoint(f, d + e, o);
        }
      }
    })(u, i);
  return { text: d(u, o, f), base64: 'data:image/jpeg;base64,' + u.getFileData().toString('base64') };
}
const l = function (t, e) {
    return Math.round(t + Math.random() * (e - t));
  },
  h = function (t) {
    const e = l(0, 24) / 24,
      n = l(60, 80) / 100,
      r = t
        ? (function (t) {
            if ('#' !== t[0]) return 1;
            3 === (t = t.slice(1)).length && (t = t[0] + t[0] + t[1] + t[1] + t[2] + t[2]);
            const e = parseInt(t, 16),
              n = e >> 16,
              r = (e >> 8) & 255,
              o = 255 & e,
              i = Math.max(n, r, o),
              a = Math.min(n, r, o);
            return (i + a) / 510;
          })(t)
        : 1;
    let o, i;
    r >= 0.5 ? ((o = Math.round(100 * r) - 45), (i = Math.round(100 * r) - 25)) : ((o = Math.round(100 * r) + 25), (i = Math.round(100 * r) + 45));
    const a = l(o, i) / 100,
      c = a < 0.5 ? a * (a + n) : a + n - a * n,
      s = 2 * a - c,
      d = Math.floor(255 * w(s, c, e + 1 / 3)),
      f = Math.floor(255 * w(s, c, e));
    return '#' + (Math.floor(255 * w(s, c, e - 1 / 3)) | (f << 8) | (d << 16) | (1 << 24)).toString(16).slice(1);
  };
function w(t, e, n) {
  return 6 * (n = (n + 1) % 1) < 1 ? t + (e - t) * n * 6 : 2 * n < 1 ? e : 3 * n < 2 ? t + (e - t) * (2 / 3 - n) * 6 : t;
}
const p = Object.prototype.toString;
function g(t) {
  return '[object Object]' === p.call(t);
}
function y() {
  'development' === process.env.NODE_ENV && console.log(...arguments);
}
const v = async function () {};
function m(t) {
  return v.constructor === t.constructor
    ? async function () {
        const e = await t.apply(this, arguments);
        return g(e) && e.msg && ((e.message = e.msg), delete e.msg), e;
      }
    : function () {
        const e = t.apply(this, arguments);
        return g(e) && e.msg && ((e.message = e.msg), delete e.msg), e;
      };
}
const b = uniCloud.database().collection('opendb-verify-codes'),
  _ = {};
var I = Object.freeze({
  __proto__: null,
  create: async function (t = {}) {
    let { scene: e, expiresDate: n, deviceId: r, ...o } = t;
    if (((r = r || __ctx__.DEVICEID), !r)) throw new Error('deviceId不可为空');
    if (!e) throw new Error('scene验证码场景不可为空');
    try {
      const { text: i, base64: a } = u(o),
        c = await this.setVerifyCode({ deviceId: r, code: i, expiresDate: n, scene: e });
      return c.code > 0 ? { ...c, code: 10001 } : ((_[r] = t), { code: 0, msg: '验证码获取成功', captchaBase64: a });
    } catch (t) {
      return { code: 10001, msg: '验证码生成失败：' + t.message };
    }
  },
  verify: async function ({ deviceId: t, captcha: e, scene: n }) {
    if (!(t = t || __ctx__.DEVICEID)) throw new Error('deviceId不可为空');
    if (!n) throw new Error('scene验证码场景不可为空');
    try {
      const r = await this.verifyCode({ deviceId: t, code: e, scene: n });
      return r.code > 0 ? { ...r, code: 10002 } : { code: 0, msg: '验证码通过' };
    } catch (t) {
      return { code: 10002, msg: '验证码校验失败：' + t.message };
    }
  },
  refresh: async function (t = {}) {
    let { scene: e, expiresDate: n, deviceId: r, ...o } = t;
    if (((r = r || __ctx__.DEVICEID), !r)) throw new Error('deviceId不可为空');
    if (!e) throw new Error('scene验证码场景不可为空');
    const i = await b.where({ deviceId: r, scene: e, state: 0 }).orderBy('created_date', 'desc').limit(1).get();
    if (i && i.data && i.data.length > 0) {
      const t = i.data[0];
      await b.doc(t._id).update({ state: 2 });
      let a = {};
      Object.keys(o).length > 0 && (_[r] = Object.assign({}, _[r], o)), (a = _[r]);
      let c = {};
      try {
        c = await this.create(Object.assign({}, a, { deviceId: r, scene: e, expiresDate: n }));
      } catch (t) {
        return { code: 50403, msg: t.message };
      }
      return c.code > 0 ? { ...c, code: 10003 } : { code: 0, msg: '验证码刷新成功', captchaBase64: c.captchaBase64 };
    }
    return { code: 10003, msg: '验证码刷新失败：无此设备信息，请重新获取' };
  },
  setVerifyCode: async function ({ deviceId: t, code: e, expiresDate: n, scene: r }) {
    if (!t) return { code: 10101, msg: 'deviceId不可为空' };
    if (!e) return { code: 10102, msg: '验证码不可为空' };
    n || (n = 180);
    const o = Date.now(),
      i = { deviceId: t, scene: r, code: e.toLocaleLowerCase(), state: 0, ip: __ctx__.CLIENTIP, created_date: o, expired_date: o + 1e3 * n };
    return y('addRes', await b.add(i)), { code: 0, deviceId: t };
  },
  verifyCode: async function ({ deviceId: t, code: e, scene: n }) {
    if (!t) return { code: 10101, msg: 'deviceId不可为空' };
    if (!e) return { code: 10102, msg: '验证码不可为空' };
    const r = Date.now(),
      o = { deviceId: t, scene: n, code: e.toLocaleLowerCase(), state: 0 },
      i = await b.where(o).orderBy('created_date', 'desc').limit(1).get();
    if ((y('verifyRecord:', i), i && i.data && i.data.length > 0)) {
      const t = i.data[0];
      if (t.expired_date < r) return { code: 10103, msg: '验证码已失效' };
      return y('upRes', await b.doc(t._id).update({ state: 1 })), { code: 0, msg: '验证通过' };
    }
    return { code: 10104, msg: '验证码错误' };
  }
});
class x {}
for (const t in I) x.prototype[t] = m(I[t]);
const P = new x(),
  E = new Proxy(P, {
    get(t, e) {
      if (e in t) return 'function' == typeof t[e] ? t[e].bind(E) : t[e];
    }
  });
module.exports = E;
